﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetAlquileresByProveedorAndFecha')
	BEGIN
		DROP  Procedure  GetAlquileresByProveedorAndFecha
	END

GO

CREATE Procedure GetAlquileresByProveedorAndFecha

	(
		@idProveedor int,
		@fecha datetime
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT
	[Cantidad],
	[Comentarios],
	[Fecha],
	[IdBien],
	[IdProveedor],
	[IdVehiculoAlquilado]
	FROM [AlquilerVehiculo] 
	WHERE [IdProveedor] = @idProveedor AND [Fecha] = @fecha

	SET NOCOUNT OFF
END

GO


GRANT EXEC ON GetAlquileresByProveedorAndFecha TO PUBLIC

GO


